From 59c04d51843cfc5d7a1eae447767c0fd99675f5e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 28 Jan 2015 18:15:19 -0500 Subject: [PATCH] file chooser: Load a directory when leaving search Ensure that some folder contents are shown in the list when we leave search mode. https://bugzilla.gnome.org/show_bug.cgi?id=743659 --- gtk/gtkfilechooserwidget.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index f192ceb577..b39b7ca030 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -2621,7 +2621,13 @@ gtk_file_chooser_widget_set_property (GObject *object, if (g_value_get_boolean (value)) operation_mode_set (impl, OPERATION_MODE_SEARCH); else - operation_mode_set (impl, OPERATION_MODE_BROWSE); + { + operation_mode_set (impl, OPERATION_MODE_BROWSE); + if (priv->current_folder) + change_folder_and_display_error (impl, priv->current_folder, FALSE); + else + switch_to_home_dir (impl); + } break; case GTK_FILE_CHOOSER_PROP_ACTION: -- 2.30.2